package org.dxy.infrastructure.persistent.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.yulichang.base.MPJBaseService;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import org.dxy.infrastructure.persistent.po.query.WorkstationBasicViewPo;

import java.util.List;

/**
 * 工位统一视图服务接口
 * @author dxy
 * @createTime 2025/10/13
 */
public interface WorkstationBasicViewService extends MPJBaseService<WorkstationBasicViewPo> {

    /**
     * 分页查询工位视图信息
     */
    Page<WorkstationBasicViewPo> pageWorkstationView(Page<WorkstationBasicViewPo> page,
                                                      Long factoryId,
                                                      Long workshopId,
                                                      Long productionLineId,
                                                      String workstationCode,
                                                      String workstationName,
                                                      String status);

    /**
     * 根据工位ID查询详细信息
     */
    WorkstationBasicViewPo getWorkstationViewById(Long workstationId);

    /**
     * 查询指定产线下的所有工位视图
     */
    List<WorkstationBasicViewPo> listWorkstationViewByProductionLineId(Long productionLineId);

    /**
     * 查询所有工位视图
     */
    List<WorkstationBasicViewPo> listAllWorkstationView();


    WorkstationBasicViewPo getByCode(String workstationCode);

    Long findIdByCode(@NotBlank String workstationCode);
}